digitalclockfandomcom-20200215-history
Seconds/Minutes/Hours Counter
Background For this portion of the digital clock circuit, we would need to divide the input 60Hz clock by 60 in order to get the required 1Hz, 1 cycle/second. This will be connected to an LED that will flash every second. To obtain this divide by 60 circuitry we must take a mod 10 counter that when it resets it drives the clock of the mod 6 counter. This process was to be repeated to to divide by 60 again to get minutes and then divide by 60 again to get hours. Then a final mod 12 counter is added to the end of the circuit to count the amount of hours. To create different mod counters from one chip, the appropriate bit pattern for that mod is ANDed together and the output from the AND gate is connected to the reset. So when the AND gate goes high (the appropriate bit pattern on the count is reached) it resets the count to zero. For example, the mod 10 counter requires pins Qb and Qd be ANDed because the pattern binary pattern 1010 is equal to 10. The counter chips are able to count because they use 4 JK flip flops that are wired to toggle on the falling edge of a signal, with the first flip flop connected to the clock and all subsequent flip flops have their clocks connected to the previous flip flop, resulting in a asynchronous counter. System Design This was done by using two 74LS93N TTL chips. The one was wired up to divide the frequency(clock) by 10,(mod10) which would bring the frequency from 60Hz to 6Hz. Once that had been successfully wired the mod 6 was then implemented. The mod6 would be anded with the mod10 and this then further divided the frequency from 6Hz to 1Hz which would be used to run the seconds A mod 10 counter is achieved by wiring a 74LS93 to the same configuration as Figure 1. A mod 6 counter is achieved by wiring a 74LS93 to the same configuration as Figure 2. Once the seconds counter was implemented and working, the same was to be repeated in order to make the minutes counter. This would take in the reset clock pulse from the seconds counter, 1/60Hz and divide it by 60 to produce a pulse 1/3600 Hz. This would mean that every 60 seconds the minutes LED toggle its state, in other words, it would flash once every minute. This process was to be done one more time to produce one pulse per hour. This means, another mod60 was implemented to take the pulse being produced from the minutes counter to be divided by 60 to give a new pulse 1/216000 Hz, which meant that the new hours LED would toggle its state once every hour. Then a final mod 12 counter (Figure 3.) was placed at the end of the line with its clock driven by the hours counter. Once every hour the count increments by 1. Testing 1)Test each individual mod counter as it was wired to check if it performed the appropriate count. 2)build and test next mod counter 3)Test to see if it performed the appropriate count 4) Connect the two mod counters and test if they output the right frequency (1/60 Fin). 5)repeat steps 1-4 until all mod counters work and seconds, minutes and hours work. 6) Final test, check functionality of the full circuit by checking for the right amount of pulses at each level. The beginning input frequency is increased to check the mod circuits further down the line, as under the normal 60Hz clock it would take hours to test. Results Table 1. Test results. The seconds counter worked from on first attempt. The minutes counter wasn't wired correctly. Had pins 12 and 13 ANDed together when it should have been pins 9 and 11 that needed to be ANDed together. Also, the input for the clock was wired wrong, it was getting it's input from pin 2 of previous mod counter when it should have gotten the input from the output of the AND gate.There was also Conclusion In conclusion, the circuit worked. There were some problems encountered but they were mostly wiring problems and the addition of an extra mod 60 circuit that was missing from the original design. Once they were resolved the counters all worked as intended, the seconds pulsed every second, the minutes pulsed once a minute and the hour once an hour.